#ifndef MAPWIN_H
#define MAPWIN_H

#include <QWidget>
#include <QWebEngineView>
#include <QPushButton>
#include "gpsparser.h"
class MapWin : public QWidget
{
    Q_OBJECT
public:
    explicit MapWin(QWidget *parent = nullptr);

signals:
    void jumpToWidget();

public slots:
    void updatePosition(double lng, double lat);

protected:
    void showEvent(QShowEvent *event) override;  // 显示事件处理

private:
    bool mapLoaded = false; // 声明并初始化 mapLoaded
    QWebEngineView *webView;
    QPushButton *backButton;
    GpsParser *gps;
};

#endif // MAPWIN_H
